package cate.game.train.rune.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

import java.util.List;

@ClientMsg(title = "徽章分解の请求")
@OperationSetter(GDOperation.RUNE_DECOMPOSE)
public class RuneDecomposeReq implements MsgInput {
    @NoteField(value = "徽章uid")
    public List<String> runeUids;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        game.train.rune.decompose(cc.getRole(), runeUids);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.RUNE_DECOMPOSE_REQ;
    }
}
